﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using YunSpace.Application.OrderFlowManage;
using YunSpace.Application.SystemManage;
using YunSpace.Core;

namespace YunSpace.Web.Areas.StatisticalForm.Controllers
{
    public class SaleReportsController : ControllerBase
    {
        public UserApp user = new UserApp();
        public SaleReportsApp report = new SaleReportsApp();
        public ActionResult GetItemsJson()
        {
            var date =new
            {
                User=user.GetSaleUsers()
            };
            return Content(date.ToJson());
        }

        [HttpGet]
        [HandlerAjaxOnly]
        public ActionResult GetReportByUser(string queryJson)
        {
            return Content(report.GetReportByUser(queryJson).ToJson());
        }
    }
}